package com.sumainfor.wx.tenant.controller.housekeeper;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.wx.tenant.feign.Zfeign.ZpcGmioFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.xml.transform.Source;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 *租客端问卷调查
 */
@RestController
@RequestMapping("/housekeeper/HoSurveyTopic")
public class HoWxSurveyTopicController implements Serializable {
    @Autowired
    private ZpcGmioFeign zpcGmioFeign;

    /**
     *查询问卷调查的列表
     */
    @GetMapping("/getHoSurveyTopicList")
    public JsonResult getHoSurveyTopicList(@RequestParam Map<String,Object> params){
        return zpcGmioFeign.getHoSurveyTopicList(params);
    }
    /**
     * 续签的时候查询上一份合同的全部未支付账单
     */
    @PostMapping("/getHoUnpaidBillList")
    public JsonResult getHoUnpaidBillList(@RequestBody Map<String,Object> params){
        return zpcGmioFeign.getHoUnpaidBillList(params);
    }

    /**
     * 获取租客未支付的账单
     * @param params
     * @return
     */
    @PostMapping("/getBillNoPayLast")
    public JsonResult getBillNoPayLast(@RequestBody Map<String,Object> params){

//       Source
//        PaIdBillType (1 表示除公共事业费之外的支付)(2 表示公共事业费)
        return zpcGmioFeign.getPaIdNoBill(params);

    }










    /**
     * 微信关闭预订单
     */
    @PostMapping("/CloseOrder")
    public JsonResult CloseOrder(@RequestBody Map<String,Object> params){
        return zpcGmioFeign.CloseOrder(params);
    }
    /**
     * 租客端续签的时候查询续签合同的信息
     */
    @PostMapping("/getRenUnifiedPact")
    public JsonResult getRenUnifiedPact(@RequestBody Map<String,Object> params){
        return zpcGmioFeign.getRenUnifiedPact(params);
    }
}
